<!--
 * @Description: 
 * @Author: xiongkuobiao
 * @Date: 2023-06-06 11:04:13
 * @LastEditors: xiongkuobiao
 * @LastEditTime: 2023-12-25 14:33:35
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <script>
      const arr = ["8:15", "6:35", "11:22"]
      let total = arr.reduce((pre, cur) => {
        let [hour, m] = cur.split(":")
        return pre + hour * 60 + +m
      }, 0)
      let ping = total / arr.length
      let hour = Math.floor(ping / 60)
      let m = ping % 60
      let fun = (m) => {
        return m < 10 ? `0${m}` : `${m}`
      }
      console.log(hour, fun(m))
      //   let total = 0
      //   arr.forEach((item) => {
      //     total = total + item.split(":")[0] * 60 + item.split(":")[1] * 1
      //   })
      //   debugger
      //   console.log(Math.floor(total / 60 / 3))
      //   let yu = (total / 3) % 60

      //   yu = yu > 10 ? yu : `0${yu}`
      //   console.log(Math.floor(total / 60 / 3), yu)
    </script>
  </body>
</html>
